package com.team5101.lha.team5101.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.team5101.base.BaseServiceImpl;
import com.team5101.base.IBaseDao;
import com.team5101.dto.ProductDTO;
import com.team5101.entity.TProduct;
import com.team5101.mapper.TProductMapper;
import com.team5101.product.api.IProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;


@Service
@Component
public class ProductServiceImpl extends BaseServiceImpl<TProduct> implements IProductService {

    @Autowired
    private TProductMapper mapper;


    @Override
    public IBaseDao<TProduct> getBaseDao() {
        return mapper;
    }

    @Override
    public List<TProduct> getAllList() {
        return mapper.selectAllList();
    }

    @Override
    public List<TProduct> getListByitem(ProductDTO productDTO) {
        return mapper.selectByItem(productDTO);
    }

    @Override
    public List<TProduct> getListBySecond(ProductDTO productDTO) {
        return mapper.selectSecond(productDTO);
    }

    @Override
    public List<TProduct> getListByFirst(ProductDTO productDTO) {
        return mapper.selectFirst(productDTO);
    }
}
